package cn.hpu.service.impl;

import java.util.List;
import java.util.Map;

import cn.hpu.dao.CustomerInfoDAO;
import cn.hpu.po.CustomerInfo;
import cn.hpu.service.CustomerInfoService;

public class CustomerInfoServiceImpl implements CustomerInfoService {

	private CustomerInfoDAO customerInfoDAO;

	public CustomerInfoDAO getCustomerInfoDAO() {
		return customerInfoDAO;
	}

	public void setCustomerInfoDAO(CustomerInfoDAO customerInfoDAO) {
		this.customerInfoDAO = customerInfoDAO;
	}

	public void save(CustomerInfo customerInfo) {
		
		customerInfoDAO.persist(customerInfo);
	}

	public CustomerInfo loadCustomerInfoByName(String name) {
		
		return customerInfoDAO.getCustomerInfoByName(name);
	}

	public List<CustomerInfo> loadCustomerInfoes() {
	
		return customerInfoDAO.getCustomerInfoes();
	}

	public List<CustomerInfo> loadCustomerInfoes(Integer beginIndex,
			Integer pageSize) {
		
		return customerInfoDAO.getCustomerInfoes(beginIndex , pageSize);
	}

	public Integer loadRecordCount() {
		
		return customerInfoDAO.getRecordCount();
	}

	public CustomerInfo loadCustomerInfoById(Integer id) {
		
		return customerInfoDAO.getCustomerInfoById(id);
	}

	public void update(CustomerInfo customerInfo) {
		
		customerInfoDAO.udpate(customerInfo);
	}

	public void delCustomerInfo(CustomerInfo info) {
		
		customerInfoDAO.delCustomerInfo(info);
	}

	public List<CustomerInfo> loadCustomerInfoByProperties(Map<String ,Object> queryConditions) {
		
		return customerInfoDAO.getCustomerInfoByProperties(queryConditions);
	}

	public List<CustomerInfo> loadCustomerInfoByProperties(
			Map<String, Object> queryConditions, Integer beginIndex,
			Integer pageSize) {
		
		return customerInfoDAO.getCustomerInfoByProperties(queryConditions , beginIndex , pageSize);
	}

	public List<CustomerInfo> loadCustomerSignalInfoes(Integer beginIndex,
			Integer pageSize) {
		
		return customerInfoDAO.loadCustomerSignalInfoes(beginIndex , pageSize);
	}

}
